﻿<UserControl x:Class="NexTrackDesktop.Controls.PartyCreate"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d">
    <Grid VerticalAlignment="Center" HorizontalAlignment="Center">
        
        <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Margin="16,16"
                   FontSize="18" FontWeight="Bold" Text="Create New Party" />
        <Grid Margin="16,46,16,16">
            <!--Rows for various settings/description text-->
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition MinWidth="150" MaxWidth="350" />
            </Grid.ColumnDefinitions>
            
            <Label HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="0"
                   Content="Party Description:"/>
            <Label HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1"
                   Content="Access Code:"/>
            <Label HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="4"
                   Content="Vote Limit:"/>
            <Label HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="5"
                   Content="Vote Replenishment:"/>
            
            <!--Binds user input for Party Name-->
            <TextBox VerticalAlignment="Top" Grid.Column="1" Margin="0,2,0,0"
                     Text="{Binding Path=PartyDescription, UpdateSourceTrigger=PropertyChanged}"/>

            <TextBox VerticalAlignment="Top" Grid.Column="1" Grid.Row="1" Margin="0,2,0,0"
                     Text="{Binding Path=AccessCode, UpdateSourceTrigger=PropertyChanged}"/>

            <TextBlock Grid.Column="1" Grid.Row="2" Margin="0,5" 
                       TextWrapping="Wrap">
                Anyone with this access code will be able to vote on the songs being played at your party.
            </TextBlock>

            <CheckBox Grid.Column="1" Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top" Height="22"
                      Content="Allow Song Suggestions" IsEnabled="False"/>
            <!--Binding user input to party settings-->
            <TextBox Name="VoteLimitBox" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="1" Grid.Row="4" Margin="0,2,0,0" Width="60"
                     Text="{Binding Path=VoteLimit, UpdateSourceTrigger=PropertyChanged}"/>
            <TextBox Name="VoteReplenBox" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="1" Grid.Row="5" Margin="0,2,0,0" Width="60"
                     Text="{Binding Path=VoteReplen, UpdateSourceTrigger=PropertyChanged}"/>
            <TextBlock Grid.Column="1" Grid.Row="6" Margin="0,5" 
                       TextWrapping="Wrap">
                After a song is played, guests will recieve this many votes back up to a maximum of the vote limit.
            </TextBlock>
            <Button Content="Create Party" Grid.Column="1" Grid.Row="7" Height="23" VerticalAlignment="Top" HorizontalAlignment="Right" Width="85" 
                    Command="{Binding CreatePartyCommand}" IsDefault="True"/>
        </Grid>
    </Grid>
</UserControl>